Skip to content

Bump all codegen devs to latest#1387

Merged
eddeee888 merged 60 commits intomainfrom
bump-codegen-deps
Mar 8, 2026
Merged

Bump all codegen devs to latest#1387
eddeee888 merged 60 commits intomainfrom
bump-codegen-deps

Conversation

@eddeee888
Copy link
Copy Markdown
Collaborator

@eddeee888 eddeee888 commented Mar 4, 2026

Description

This repo has some old devDeps in packages. This PR updates them all to the latest.
Depending on the use case, some may have breaking changes.

Changes

  1. Migrate all packages to Vitest, to modernise and integrate with @graphql-codegen/testing v4
    • Except for @graphql-codegen/flow, @graphql-codegen/flow-operations and @graphql-codegen/flow-resolvers packages because they depend on a CJS built flow.js file, and I don't know where it comes from
  2. Bump all @graphql-codegen/plugin-helpers to ^6.0.0 and @graphql-codegen/visitor-plugin-common to ^6.0.0
    • Except for @graphql-codegen/flow, @graphql-codegen/flow-operations and @graphql-codegen/flow-resolvers because they cannot be tested (See 1.)
    • Except for @graphql-codegen/typescript-nest and @graphql-codegen/typescript-type-graphql because it's too hard to fix the tests
  3. Bump all packages with changes in 1. and 2. a major version as there are lots of changes in the shared packages
    • Except for @graphql-codegen/typescript-react-apollo as we have plans to deprecate it. Releasing a major right now may give the wrong signal to users
  4. Stop running unit tests on Node 18, start running unit tests on Node 24

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 4, 2026

🦋 Changeset detected

Latest commit: 232c2de

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@graphql-codegen/c-sharp Patch
@graphql-codegen/c-sharp-common Patch
@graphql-codegen/c-sharp-operations Patch
@graphql-codegen/flutter-freezed Patch
@graphql-codegen/hasura-allow-list Patch
@graphql-codegen/import-types-preset Patch
@graphql-codegen/java Patch
@graphql-codegen/java-apollo-android Patch
@graphql-codegen/java-common Patch
@graphql-codegen/java-resolvers Patch
@graphql-codegen/jsdoc Patch
@graphql-codegen/kotlin Patch
@graphql-codegen/named-operations-object Patch
@graphql-codegen/near-operation-file-preset Patch
@graphql-codegen/typescript-apollo-angular Patch
@graphql-codegen/typescript-apollo-client-helpers Patch
@graphql-codegen/typescript-enum-array Patch
@graphql-codegen/typescript-generic-sdk Patch
@graphql-codegen/typescript-graphql-apollo Patch
@graphql-codegen/typescript-graphql-files-modules Patch
@graphql-codegen/typescript-graphql-request Patch
@graphql-codegen/typescript-jit-sdk Patch
@graphql-codegen/typescript-mongodb Patch
@graphql-codegen/typescript-msw Patch
@graphql-codegen/typescript-nhost Patch
@graphql-codegen/typescript-oclif Patch
@graphql-codegen/typescript-react-apollo Patch
@graphql-codegen/typescript-react-offix Patch
@graphql-codegen/typescript-react-query Patch
@graphql-codegen/typescript-rtk-query Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dargmuesli
Copy link
Copy Markdown
Contributor

Thank you for your maintenance @eddeee888, much love! ❤️

@eddeee888 eddeee888 force-pushed the bump-codegen-deps branch 2 times, most recently from 8f2be4e to 4e18a96 Compare March 6, 2026 11:47
Comment on lines +162 to +163
baseType: this.scalars[schemaType.name].input,
typeName: this.scalars[schemaType.name].input,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are best guess based on function name. If something's wrong, happy to change!

Comment on lines +157 to +158
baseType: this.scalars[schemaType.name].input,
typeName: this.scalars[schemaType.name].input,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are best guess based on function name. If something's wrong, happy to change!

Comment on lines +78 to +79
if (this.scalars[type.name.value]?.output) {
return this.scalars[type.name.value].output;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are best guess based on function name. If something's wrong, happy to change!


const transformScalar = (scalar: string) => {
if (DEFAULT_SCALARS[scalar] === undefined) {
if (DEFAULT_SCALARS[scalar]?.output === undefined) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are best guess based on function name. If something's wrong, happy to change!

Comment on lines -43 to -59
it('should import DocumentNode when using noGraphQLTag', async () => {
const docs = [{ location: '', document: basicDoc }];
const content = (await plugin(
schema,
docs,
{
noGraphQLTag: true,
},
{
outputFile: 'graphql.tsx',
},
)) as Types.ComplexPluginOutput;

expect(content.prepend).toContain(`import { DocumentNode } from 'graphql';`);
expect(content.prepend).not.toContain(`import gql from 'graphql-tag';`);
await validateTypeScript(content, schema, docs, {});
});
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noGraphQLTag has been deprecated so no need for this test

@eddeee888 eddeee888 force-pushed the bump-codegen-deps branch from 1840300 to d1b4ed0 Compare March 6, 2026 12:24
@eddeee888 eddeee888 force-pushed the bump-codegen-deps branch from 2b3cd04 to 9ed8c5c Compare March 7, 2026 11:49
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 7, 2026

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-codegen/c-sharp 6.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/c-sharp-common 2.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/c-sharp-operations 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/flutter-freezed 5.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/java-apollo-android 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/java-common 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/java 5.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/kotlin 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/java-resolvers 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/hasura-allow-list 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/jsdoc 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/urql-introspection 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-apollo-angular 5.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-apollo-client-helpers 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-enum-array 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-generic-sdk 5.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-graphql-apollo 3.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-graphql-files-modules 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-graphql-request 7.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-jit-sdk 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-mongodb 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-msw 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/named-operations-object 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-nhost 1.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-oclif 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-react-apollo 4.4.1-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-react-offix 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-react-query 7.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-rtk-query 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-solid-query 2.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-stencil-apollo 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-urql 5.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-urql-graphcache 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/urql-svelte-operations-store 3.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-vue-apollo 5.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-vue-apollo-smart-ops 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-vue-urql 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/import-types-preset 4.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎
@graphql-codegen/near-operation-file-preset 5.0.0-alpha-20260307133543-232c2de1cb3695656246370c5d737bc0eabb6fb2 npm ↗︎ unpkg ↗︎

@eddeee888 eddeee888 force-pushed the bump-codegen-deps branch from 728b5ec to a2ead29 Compare March 7, 2026 13:05
@eddeee888 eddeee888 force-pushed the bump-codegen-deps branch from c9d856e to bec593e Compare March 7, 2026 13:22
@eddeee888 eddeee888 marked this pull request as ready for review March 7, 2026 13:53
@eddeee888 eddeee888 merged commit 0717cb7 into main Mar 8, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants